package com.zrwl.poscloud.base.enums;

/**
 * 来源类型
 */
public enum ESourceType {

    /***
     * ic_card_log  adminLog
     */
    icl_employeeAccountRecord(1, 1, 10, "账户业务"),
    icl_icCardRecord(2, 1, 10, "卡务业务"),
    icl_tradeDetail(3, 1, 10, "消费机业务"),
    icl_subsidy(4, 1, 10, "补贴业务"),
    icl_importConfig(5, 1, 10, "批量操作"),
    icl_rechargeTrade(6, 1, 10, "充值机业务"),

    icl_abnormalTrade(7,1,10,"异常交易"),

    icl_mealOrder(8,1,10,"餐单记录"),
    icl_employeeFace(9, 1, 11, "人脸开通"),
    icl_employeeAccountLog(10, 1, 11, "账户业务日志"),
    /**
     * 演示-End
     */
    Example(0, 1, 100, "测试");

    private final int type;
    private final int start;
    private final int length;
    private final String name;

    ESourceType(int type, int start, int length, String name) {
        this.type = type;
        this.start = start;
        this.length = length;
        this.name = name;
    }

    public int getStart() {
        return start;
    }

    public int getLength() {
        return length;
    }

    public int getType() {
        return type;
    }

    public String getName() {
        return name;
    }

    public static ESourceType getByValue(int value) {
        for (ESourceType busiType : values()) {
            if (busiType.getType() == value) {
                return busiType;
            }
        }
        return null;
    }
}